The invention relates generally to toilet accessory devices, and in particular to a toilet overflow prevention device. When a mechanical failure occurs in the toilet tank, the damage caused can be substantial. Often times, the tank continues to fill the toilet bowl with water, causing the toilet bowl to overflow, spilling water on the floor that may be contaminated with human urine and fecal material. When this occurs, it not only requires clean-up, but may present a serious health hazard, damage the floor, or even create a liability issue if the owner resides in an upstairs apartment. An overflow prevention device that detects an elevated level of water in the toilet bowl, and shuts off the flow of water from the toilet tank before the toilet bowl overflows, would prevent the need for clean-up and also eliminate the health, water damage, and liability risks.